package com.byt.framlib.commonutils;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;

/**
 * Created by admin on 2018/4/2.
 */

public class CopyUtils {
    /**
     * 拷贝文本到剪辑版
     *
     * @param content
     * @param context
     */
    public static void copyStringToClipBoard(Context context, String content) {
        ClipboardManager cmb = (ClipboardManager) context
                .getSystemService(Context.CLIPBOARD_SERVICE);
        cmb.setPrimaryClip(ClipData.newPlainText(null, content.trim()));
    }
}
